<div class="row">
<style>
.words{padding-top:7px;}
</style>
     <div class="col-xs-12 col-xs-12">
          <div class="widget radius-bordered">
              <div class="widget-header bg-blue">
				<i class="widget-icon fa fa-arrow-down"></i>
				<span class="widget-caption">维护日志</span>
				<div class="widget-buttons">
					<a href="#" data-toggle="maximize">
						<i class="fa fa-expand"></i>
					</a>
					<a href="#" data-toggle="collapse">
						<i class="fa fa-minus"></i>
					</a>
					<a href="#" data-toggle="dispose">
						<i class="fa fa-times"></i>
					</a>
				</div>
			</div>
              <div class="widget-body">
                   <form id="YstechForm" action="" method="post" class="form-horizontal"
                                                  data-bv-message=""
                                                  data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
                                                  data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
                                                  data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
                  <neq name="cache.ID" value=""><input type="hidden" name="ID" value="{$cache.ID}"></neq>
                  <input type="hidden" name="lock_id" value="{$lock_id}">
                  <div class="form-title">
                        <a href="{:U('Cms/Locks/goodsRepair',array('p1'=>$p1,'id'=>$lock_id))}" class="btn btn-primary" data-loader="Ystech-loader" data-loadername="智能锁维护">
							<i class="fa fa-mail-reply"></i>返回
						</a>
                   </div>
				   <div class="form-group">
                        <label class="col-lg-2 control-label">序列号</label>
                        <input type="hidden" name="LockID" value="{$lockinfo.SerialNo}">
                        <div class="col-lg-4 words">
                        {$lockinfo.SerialNo}【{$LOCKTYPE[$lockinfo['LockType']]}】
                        </div>
                   </div>
				   
                   <div class="form-group">
                        <label class="col-lg-2 control-label">故障现象</label>
                        <div class="col-lg-4">
                        <textarea class="form-control" name="BugMemo">{$cache.BugMemo}</textarea>
                        </div>
                   </div>
                    
                   <div class="form-group">
                        <label class="col-lg-2 control-label">维修结果</label>
                        <div class="col-lg-4">
                        <textarea class="form-control" name="Result">{$cache.Result}</textarea>
                        </div>
                   </div>
				   
                   <div class="form-group">
                        <label class="col-lg-2 control-label">维修人</label>
                        <div class="col-lg-4">
                         <input type="text" name="RepairPerson" class="form-control" value="{$cache.RepairPerson}">
                        </div>
                   </div>
                   
                   <div class="form-group">
                        <label class="col-lg-2 control-label">维修日期</label>
                        <div class="col-lg-4">
                        <input type="text" id="RepairDate" name="RepairDate" class="form-control" value="<neq name='cache.RepairDate|intval' value=''>{$cache.RepairDate|strtotime|date='Y-m-d',###}</neq>">
                        </div>
                   </div>
                   
					<div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                             <button class="btn btn-primary btn-lg" type="submit">保存</button>&nbsp;&nbsp;&nbsp;&nbsp;
                             <button class="btn btn-palegreen btn-lg" type="reset">重填</button>
                        </div>
                    </div>
                   </form>
                </div>
        </div>
	</div>
     
</div>
<!--面包屑导航封装-->
<div id="tmpbread" style="display: none;">{$breadhtml}</div>
<script type="text/javascript">
	setBread($('#tmpbread').html());
</script>
<!--/面包屑导航封装-->

<!--表单验证与提交封装-->
<script type="text/javascript">
	
	$('#RepairDate').datepicker({format:"yyyy-mm-dd",autoclose:1});
	
	$('#YstechForm').bootstrapValidator({
		submitHandler: function (validator, form, submitButton) {
			
			if(!$('textarea[name="BugMemo"]').val()){
				$.Ystech.alert('danger','请输入故障现象！');
				return false;
			}
			
			if(!$('input[name="lock_id"]').val()){
				$.Ystech.alert('danger','请选择智能锁！');
				return false;
			}
			
           	var tourl="{:U('Cms/Locks/repair')}";
			var data=$('#YstechForm').serialize();
			$.Ystech.ajax('post',tourl,data,null);
			return false;
        },
	});
	
	
</script>
<!--/表单验证与提交封装-->
